Once you have done your calculations using sin, or cos etc... the result is in radians. This may not always be what you want and so to turn the radians into degrees we use this function. For example, radtodeg(sin(180)) will return -45 degrees. This function translates radians into degrees using the formula:
angle_degrees = angle_radians * 180 / pi;
radtodeg(rad);
Argument | Description |
---|---|
rad | The radians to convert. |
Real
val = radtodeg( pi );
This will set val to 180.